home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 13312 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  872 b 

  1. Path: nuscc.nus.sg!eng30403
  2. From: eng30403@leonis.nus.sg (Tey Chee Meng)
  3. Newsgroups: comp.lang.c
  4. Subject: Strange looking cast in lvalue
  5. Date: 6 Apr 1996 04:34:34 GMT
  6. Organization: NUS
  7. Message-ID: <4k4s8q$3sv@nuscc.nus.sg>
  8. NNTP-Posting-Host: eng30403%@leonis.nus.sg
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11. (FARPROC)fnSnmpStrToOid=GetProcAddress(hinstWinSNMP,"_SNMPSTRTOOID");
  12.  
  13.     Can anyone explain the effect, if any, of that (FARPROC) cast on the 
  14. LHS of the expression ? fnSnmpStrToOid is a pointer to a function. 
  15. GetProcAddress returns a pointer to a function as well but is of 
  16. different type from fnSnmpStrToOid. Arent cast always used on the RHS of 
  17. assignment expressions ?
  18.  
  19.     I found this code in the windows SDK help, but thought it is more 
  20. a 'C' question than a windows question. Thanks.
  21.  
  22. --
  23.  
  24. Tey Chee Meng   
  25.  
  26. " Not to take extremes, the middle way is the best "
  27.  
  28.